﻿@using AfrikDotnetWebSite.Models;
@using AfrikDotnetWebSite.Helpers;
@model IEnumerable<News>
@{
    ViewBag.Title = "News";
}

<div class="cf">
    <div class="large-pane float-left">
         <div class="news">
            <h2>@Html.ActionLink("Home", "Index", "home") » News</h2>

            @if (Model.Count() > 0)
            {
                <ul>
                    @foreach (News news in Model)
                    { 
                       <li>
                            <div>
                                <div class="text">@Html.Raw(LinkHelper.MakeLink(news.Text))</div>
                                <div class="date">
                                    @news.Date.ToString("dddd, dd MMMM yyyy '-' HH':'mm 'UTC'") 
                                </div>
                            </div>
                        </li>
                    }
                </ul>
            }
            else
            { 
                <div class="empty">No news</div>
            }
        </div>   </div>
    <div class="small-pane float-right">
        @Html.Partial("_SidePane")
     </div>
</div>